var db = require('./db_base')
var DBBase = db.DBBase
var mongoose = db.mongoose
var Schema = mongoose.Schema

//创建书籍分类数据结构
var foodSchema = new Schema({
    name:String,
    type:String,
    price:String,
    img:String,
    description:String
})
var Foods = mongoose.model("foods",foodSchema)

/**
 * 分类模型
 */
class FoodsDal extends DBBase{
    constructor(){
        super(Foods)
    }
}

module.exports = {
    Foods:Foods,
    FoodsDal:FoodsDal
}
